package com.vgemv.jsutilitysdkdemo.module.preview;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;

import androidx.annotation.Nullable;

import com.vgemv.jsutilitysdk.preview.JsVideoPreviewActivity;
import com.vgemv.jsutilitysdkdemo.R;

public class VideoPreviewActivity extends Activity {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_video_preview);


    }

    public void playLocalVideo(View view) {
        Intent intent = new Intent(this, JsVideoPreviewActivity.class);
        String dcimDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();
        String filePath = String.format("%s/MixedPlayer/2x2.mp4",dcimDir);
        intent.putExtra(JsVideoPreviewActivity.LOCAL_VIDEO_FILE_KEY,filePath);
        startActivity(intent);
    }
}
